import {
  SiApachekafka,
  SiApacheparquet,
  SiApachepulsar,
  SiClickhouse,
  SiCockroachlabs,
  SiDgraph,
  SiJaeger,
  SiMqtt,
  SiNeo4j,
  SiOllama,
  SiOpenai,
  SiSplunk,
  SiTrino,
} from '@icons-pack/react-simple-icons';
import { RedpandaUILetterIconColor } from 'components/redpanda-ui/components/icons';
import {
  Activity,
  Archive,
  BarChart3,
  CircleSlash,
  Command,
  Cpu,
  Database,
  File,
  FileArchive,
  FileInput,
  FileOutput,
  FileSearch,
  FileSpreadsheet,
  FileText,
  Folder,
  FolderOpen,
  GitBranch,
  Globe,
  Network,
  Package,
  RefreshCw,
  ScrollText,
  Server,
  Terminal,
  Type,
  Workflow,
} from 'lucide-react';

import {
  AmazonWebServicesLogo,
  ApacheactivemqLogo,
  ApacheavroLogo,
  AuthzedLogo,
  AWSCloudWatchLogo,
  AWSDynamoDbLogo,
  AWSKinesisLogo,
  AWSLambdaLogo,
  AWSS3Logo,
  AWSSNSLogo,
  AWSSQSLogo,
  BeanstalkdLogo,
  CassandraLogo,
  CohereLogo,
  CouchbaseLogo,
  DiscordLogo,
  ElasticsearchLogo,
  GnuLogo,
  GoogleCloudLogo,
  GoogleDriveLogo,
  GoogleProtocolBuffersLogo,
  HadoopLogo,
  InfluxDBLogo,
  JavaScriptLogo,
  JqLogo,
  JSONLogo,
  MemcachedLogo,
  MicrosoftazureLogo,
  MicrosoftsqlserverLogo,
  MongoDBLogo,
  MySQLLogo,
  NanomsgLogo,
  NatsLogo,
  NsqLogo,
  OpenSearchLogo,
  OpenTelemetryLogo,
  OracleLogo,
  PineconeLogo,
  PostgreSQLLogo,
  PrometheusLogo,
  PusherLogo,
  QdrantLogo,
  RabbitMQLogo,
  RedisLogo,
  SentryLogo,
  SlackLogo,
  SnowflakeLogo,
  WebSocketLogo,
  XmlLogo,
} from './logos';

export const componentLogoMap = {
  amqp_0_9: RabbitMQLogo,
  amqp_1: ApacheactivemqLogo,
  archive: Archive,
  avro: ApacheavroLogo,
  awk: GnuLogo,
  aws_bedrock_chat: AmazonWebServicesLogo,
  aws_bedrock_embeddings: AmazonWebServicesLogo,
  aws_cloudwatch: AWSCloudWatchLogo,
  aws_dynamodb: AWSDynamoDbLogo,
  aws_dynamodb_partiql: AWSDynamoDbLogo,
  aws_kinesis: AWSKinesisLogo,
  aws_kinesis_firehose: AWSKinesisLogo,
  aws_lambda: AWSLambdaLogo,
  aws_s3: AWSS3Logo,
  aws_sns: AWSSNSLogo,
  aws_sqs: AWSSQSLogo,
  azure_blob_storage: MicrosoftazureLogo,
  azure_cosmosdb: MicrosoftazureLogo,
  azure_data_lake_gen2: MicrosoftazureLogo,
  azure_queue_storage: MicrosoftazureLogo,
  azure_table_storage: MicrosoftazureLogo,
  batched: Package,
  beanstalkd: BeanstalkdLogo,
  benchmark: Activity,
  bloblang: RedpandaUILetterIconColor,
  bounds_check: undefined,
  branch: undefined,
  broker: undefined,
  cache: Database,
  cached: Database,
  cassandra: CassandraLogo,
  catch: undefined,
  chunker: undefined,
  cockroachdb_changefeed: SiCockroachlabs,
  cohere_chat: CohereLogo,
  cohere_embeddings: CohereLogo,
  cohere_rerank: CohereLogo,
  command: Command,
  compress: FileArchive,
  couchbase: CouchbaseLogo,
  crash: undefined,
  csv: FileSpreadsheet,
  cyborgdb: undefined,
  cypher: SiNeo4j,
  decompress: FolderOpen,
  dedupe: undefined,
  discord: DiscordLogo,
  drop: undefined,
  drop_on: undefined,
  dynamic: undefined,
  elasticsearch_v8: ElasticsearchLogo,
  fallback: undefined,
  file: File,
  for_each: undefined,
  gateway: Network,
  gcp_bigquery: GoogleCloudLogo,
  gcp_bigquery_select: GoogleCloudLogo,
  gcp_cloud_storage: GoogleCloudLogo,
  gcp_cloudtrace: GoogleCloudLogo,
  gcp_pubsub: GoogleCloudLogo,
  gcp_spanner_cdc: GoogleCloudLogo,
  gcp_vertex_ai_chat: GoogleCloudLogo,
  gcp_vertex_ai_embeddings: GoogleCloudLogo,
  generate: undefined,
  git: GitBranch,
  google_drive_download: GoogleDriveLogo,
  google_drive_list_labels: GoogleDriveLogo,
  google_drive_search: GoogleDriveLogo,
  grok: ElasticsearchLogo,
  group_by: undefined,
  group_by_value: undefined,
  hdfs: HadoopLogo,
  http: Globe,
  http_client: Globe,
  http_server: Server,
  influxdb: InfluxDBLogo,
  inproc: undefined,
  insert_part: undefined,
  jaeger: SiJaeger,
  javascript: JavaScriptLogo,
  jmespath: undefined,
  jq: JqLogo,
  json_api: JSONLogo,
  json_array: JSONLogo,
  json_documents: JSONLogo,
  json_schema: JSONLogo,
  kafka: SiApachekafka,
  kafka_franz: SiApachekafka,
  lines: FileText,
  local: Folder,
  log: ScrollText,
  logger: ScrollText,
  lru: undefined,
  mapping: undefined,
  memcached: MemcachedLogo,
  memory: undefined,
  metric: BarChart3,
  microsoft_sql_server_cdc: MicrosoftsqlserverLogo,
  mongodb: MongoDBLogo,
  mongodb_cdc: MongoDBLogo,
  mqtt: SiMqtt,
  msgpack: undefined,
  multilevel: undefined,
  mutation: undefined,
  mysql_cdc: MySQLLogo,
  nanomsg: NanomsgLogo,
  nats: NatsLogo,
  nats_jetstream: NatsLogo,
  nats_kv: NatsLogo,
  nats_request_reply: NatsLogo,
  nats_stream: NatsLogo,
  none: undefined,
  noop: CircleSlash,
  nsq: NsqLogo,
  ockam_kafka: SiApachekafka,
  ollama_chat: SiOllama,
  ollama_embeddings: SiOllama,
  ollama_moderation: SiOllama,
  open_telemetry_collector: OpenTelemetryLogo,
  openai_chat_completion: SiOpenai,
  openai_embeddings: SiOpenai,
  openai_image_generation: SiOpenai,
  openai_speech: SiOpenai,
  openai_transcription: SiOpenai,
  openai_translation: SiOpenai,
  opensearch: OpenSearchLogo,
  parallel: undefined,
  parquet: SiApacheparquet,
  parquet_decode: SiApacheparquet,
  parquet_encode: SiApacheparquet,
  parse_log: FileSearch,
  pg_stream: PostgreSQLLogo,
  pinecone: PineconeLogo,
  postgres_cdc: PostgreSQLLogo,
  processors: Cpu,
  prometheus: PrometheusLogo,
  protobuf: GoogleProtocolBuffersLogo,
  pulsar: SiApachepulsar,
  pusher: PusherLogo,
  qdrant: QdrantLogo,
  questdb: undefined,
  rate_limit: Activity,
  re_match: undefined,
  read_until: undefined,
  redis: RedisLogo,
  redis_hash: RedisLogo,
  redis_list: RedisLogo,
  redis_pubsub: RedisLogo,
  redis_scan: RedisLogo,
  redis_script: RedisLogo,
  redis_streams: RedisLogo,
  redpanda: RedpandaUILetterIconColor,
  redpanda_common: RedpandaUILetterIconColor,
  redpanda_data_transform: RedpandaUILetterIconColor,
  redpanda_migrator: RedpandaUILetterIconColor,
  redpanda_migrator_bundle: RedpandaUILetterIconColor,
  redpanda_migrator_offsets: RedpandaUILetterIconColor,
  reject: undefined,
  reject_errored: undefined,
  resource: Package,
  retry: RefreshCw,
  ristretto: SiDgraph,
  schema_registry: undefined,
  schema_registry_decode: undefined,
  schema_registry_encode: undefined,
  select_parts: undefined,
  sentry_capture: SentryLogo,
  sequence: undefined,
  sftp: undefined,
  skip_bom: undefined,
  slack: SlackLogo,
  slack_post: SlackLogo,
  slack_reaction: SlackLogo,
  slack_thread: SlackLogo,
  slack_users: SlackLogo,
  sleep: undefined,
  snowflake_put: SnowflakeLogo,
  snowflake_streaming: SnowflakeLogo,
  socket: Network,
  socket_server: Server,
  spicedb_watch: AuthzedLogo,
  split: undefined,
  splunk: SiSplunk,
  splunk_hec: SiSplunk,
  sql: Database,
  sql_driver_clickhouse: SiClickhouse,
  sql_driver_gocosmos: MicrosoftazureLogo,
  sql_driver_mssql: MicrosoftsqlserverLogo,
  sql_driver_mysql: MySQLLogo,
  sql_driver_oracle: OracleLogo,
  sql_driver_postgres: PostgreSQLLogo,
  sql_driver_snowflake: SnowflakeLogo,
  sql_driver_sqlite: MySQLLogo,
  sql_driver_trino: SiTrino,
  stdin: FileInput,
  stdout: FileOutput,
  subprocess: Terminal,
  switch: undefined,
  sync_response: undefined,
  tcp: Network,
  tcp_server: Server,
  text: Type,
  try: undefined,
  unarchive: FolderOpen,
  websocket: WebSocketLogo,
  while: undefined,
  workflow: Workflow,
  xml: XmlLogo,
  zmq4: undefined,
} as const;

export type ComponentName = keyof typeof componentLogoMap;
